package com.ctiot.custom.oauth.model;

/**
 * @projectName: oauth-sdk-bim
 * @packageName: com.ctiot.bim.oauth.model
 * @description:
 * @author: huayang.bai
 * @date: 2021-04-12 10:45
 */
public class CustomResponse<T> {

    private static final String CORE_OK = "core.ok";

    private String reason;

    private String code;

    private T data;


    public String getReason() {
        return this.reason;
    }

    public CustomResponse setReason(String reason) {
        this.reason = reason;
        return this;
    }

    public String getCode() {
        return this.code;
    }

    public CustomResponse setCode(String code) {
        this.code = code;
        return this;
    }

    public T getData() {
        return this.data;
    }

    public CustomResponse setData(T data) {
        this.data = data;
        return this;
    }

    public boolean isOK() {
        return "core.ok".equals(this.code);
    }

}
